﻿using Prism.Commands;
using Prism.Mvvm;
using Prism.Navigation.Regions;

namespace L6_RegionNavigation.Confirm.ViewModels
{
    public class MainWindowViewModel : BindableBase
    {
        private readonly IRegionManager regionManager;

        public DelegateCommand<string> NavigateToViewCommand { get; set; }

        public MainWindowViewModel(IRegionManager regionManager)
        {
            this.regionManager = regionManager;

            NavigateToViewCommand = new DelegateCommand<string>(view =>
            {
                this.regionManager.RequestNavigate("ContentRegion", view);
            });
        }
    }
}